package com.zudada.servermain.controller;

import cn.hutool.core.bean.BeanUtil;
import com.zudada.servermain.POJO.DTO.postTest;
import com.zudada.servermain.POJO.VO.postTestVO;
import com.zudada.servermain.POJO.enums.Result;
import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.web.bind.annotation.*;


@RestController
@Api(tags = "项目测试")
@RequestMapping("hello")
public class hello {
    @Operation(summary = "get测试")
    @PostMapping("/get/{id}")
    public Result hello(@PathVariable String id){
        return Result.success();
    }
    @Operation(summary = "post测试")
    @PostMapping("/post")
    public Result<postTestVO> hello(@RequestBody postTest postTest){
     postTestVO p=BeanUtil.copyProperties(postTest, postTestVO.class);
        return Result.success(p);
    }



}
